package com.fc.advbox.entity;

import com.fc.advbox.utils.validator.group.AddGroup;
import com.fc.advbox.utils.validator.group.UpdateGroup;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by E7450 on 2018/6/21.
 */
@Getter
@Setter
public class EquipmentEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message="ID不能为空", groups = {UpdateGroup.class})
    private Long id;          // 主键

    @NotBlank(message="设备编码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String code;      // 设备编码
    private String name;      // 名称
    @NotBlank(message="所属城市不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String city;      // 城市
    private String district;  // 街道
    private String latitude;  // 维度
    private String longitude; // 经度
    private String type;      // 类型
    private String remark;    // 备注
    private String status;    //状态
    private Date buildDate;   // 安装时间
    private BigDecimal cost;  // 设备成本，维护成本
    private Long tenantId;    // 承租人
    private String tenantName; // 承租人姓名
    private Date rentStartDate; // 当前租期的开始时间
    private Date rentEndDate; // 当前租期的结束时间

    private List<EquipmentAttrEntity> attrs; // 额外属性
    private Long agentId;
    private String agentName;
    private Long channelId;
    private String channelName;
}
